<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <link rel="stylesheet" href="https://daneden.github.io/animate.css/animate.min.css">
    <style>

    </style>
</head>
<body>
    <div id="app">
        <button @click="flag=!flag">Toggle</button>
        <!-- transition 元素是Vue官方提供的 -->
        <!--
            使用animate第三方动画，
            只需要加入相关的类名就可以啦
            :duration 绑定属性，可以控制动画时间
        -->
        <transition 
            :duration="2400"
            enter-active-class="animated bounceIn" 
            leave-active-class="animated bounceOut">
            <h3 v-if="flag">这是一个H3</h3>
        </transition>
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                flag: false
            }, 
            methods: {

            }
        });
    </script>
</body>
</html>